package com.cl.short_video_java.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import lombok.Data;

/**
 * @TableName sys_setting
 */
@TableName(value = "sys_setting")
@Data
public class SysSetting implements Serializable {
	/**
	 * 设置id
	 */
	@TableId(value = "`key`")
	private String key;

	/**
	 * 值
	 */
	@TableField(value = "`value`")
	private String value;
	private Integer status;
	private LocalDateTime createTime;
	private Integer type;

	/**
	 * 备注
	 */
	private String note;

	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		SysSetting other = (SysSetting) that;
		return (this.getKey() == null ? other.getKey() == null : this.getKey().equals(other.getKey()))
				&& (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
				&& (this.getNote() == null ? other.getNote() == null : this.getNote().equals(other.getNote()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getKey() == null) ? 0 : getKey().hashCode());
		result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
		result = prime * result + ((getNote() == null) ? 0 : getNote().hashCode());
		return result;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", key=").append(key);
		sb.append(", value=").append(value);
		sb.append(", note=").append(note);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}
}